package cn.crex1.springboot.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.crex1.springboot.exception.MyException;

/**  
* <p>title: ExceptionController</p>  
* <p>description: </p>  
* @author zzh  
* @date 2018年7月19日  
*/
@RestController
@RequestMapping("/error")
public class ExceptionController {
	
	@GetMapping("/404")
	public String error404() throws Exception {
		throw new Exception("发生错误");		
	}
	
	@GetMapping("/500")
	public String error500() throws Exception{
		throw new MyException("发生错误");
	}

}
